<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>添加产品</title>
    <link rel="stylesheet" type="text/css" href="$request.getContextPath()/resources/layui/css/layui.css">
    <style type="text/css">
        #productLogo{
            width: 1080px;
            height: 400px;
            transition:all 0.3s;
            margin-left: 110px;
        }
    </style>
</head>
<body>
<form class="layui-form" action="">
    <div class="layui-form-item">
        <label class="layui-form-label">产品标题</label>
        <div class="layui-input-inline">
            <input type="text" name="title" disabled="disabled" value="$!product.title" required placeholder="请输入产品标题" autocomplete="off" class="layui-input">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">产品分类</label>
        <div class="layui-input-inline">
            <select name="categoryId" required lay-verify="required">
                <option value="">$!product.categoryName</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item layui-form-text site-demo-upload">
        <label class="layui-form-label">产品LOGO</label>
        <div class="layui-input-inline">
            <img id="productLogo" src="$url.zimg()/$!product.logo">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">产品内容</label>
        <div class="layui-input-block">
            <textarea id="productContent" name="content" placeholder="请输入产品内容" class="layui-textarea">$!product.content</textarea>
        </div>
    </div>
</form>
</body>
<script type="text/javascript" src="$request.getContextPath()/resources/jquery/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="$request.getContextPath()/resources/layui/layui.js"></script>
<script type="text/javascript" src="$request.getContextPath()/resources/layui/lay/modules/element.js"></script>
<script type="text/javascript">
    $(function(){
        layui.use(['form', 'layedit', 'laydate'], function(){
            var form = layui.form(),layer = layui.layer,layedit = layui.layedit,laydate = layui.laydate;
            var productContentIndex=layedit.build('productContent',{
                height: 460,
                tool: []
            }); //建立编辑器
        });
    });
</script>
</html>